.class public Lcom/baidu/mobad/feeds/BaiduNativeManager;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Lcom/baidu/mobad/feeds/BaiduNative$NativeADEventListener;
.implements Lcom/baidu/mobad/feeds/BaiduNative$NativeDownloadListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;
    }
.end annotation


# static fields
.field private static final a:Ljava/lang/String; = "BaiduNativeManager"


# instance fields
.field private final b:Landroid/content/Context;

.field private final c:Ljava/lang/String;

.field private d:Z

.field private e:I

.field private f:Z

.field private g:Lcom/baidu/mobad/feeds/RequestParameters;

.field private h:Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .locals 1

    const/16 v0, 0x1f40

    .line 1
    invoke-direct {p0, p1, p2, v0}, Lcom/baidu/mobad/feeds/BaiduNativeManager;-><init>(Landroid/content/Context;Ljava/lang/String;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;I)V
    .locals 1

    const/4 v0, 0x1

    .line 2
    invoke-direct {p0, p1, p2, v0, p3}, Lcom/baidu/mobad/feeds/BaiduNativeManager;-><init>(Landroid/content/Context;Ljava/lang/String;ZI)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Z)V
    .locals 1

    const/16 v0, 0x1f40

    .line 3
    invoke-direct {p0, p1, p2, p3, v0}, Lcom/baidu/mobad/feeds/BaiduNativeManager;-><init>(Landroid/content/Context;Ljava/lang/String;ZI)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;ZI)V
    .locals 2

    .line 4
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x1

    .line 5
    iput-boolean v0, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->d:Z

    const/16 v0, 0x1f40

    .line 6
    iput v0, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->e:I

    const/4 v0, 0x0

    .line 7
    iput-boolean v0, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->f:Z

    .line 8
    iput-object p1, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->b:Landroid/content/Context;

    .line 9
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v0

    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->initializeApplicationContext(Landroid/content/Context;)V

    .line 10
    iput-object p2, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->c:Ljava/lang/String;

    .line 11
    iput-boolean p3, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->d:Z

    .line 12
    iput p4, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->e:I

    .line 13
    invoke-static {p1}, Lcom/baidu/mobads/f/q;->a(Landroid/content/Context;)Lcom/baidu/mobads/f/q;

    move-result-object p1

    invoke-virtual {p1}, Lcom/baidu/mobads/f/q;->a()V

    return-void
.end method


# virtual methods
.method public loadFeedAd(Lcom/baidu/mobad/feeds/RequestParameters;Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;)V
    .locals 6

    .line 1
    iput-object p1, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->g:Lcom/baidu/mobad/feeds/RequestParameters;

    .line 2
    iput-object p2, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->h:Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;

    .line 3
    new-instance p2, Lcom/baidu/mobad/feeds/BaiduNative;

    iget-object v1, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->b:Landroid/content/Context;

    iget-object v2, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->c:Ljava/lang/String;

    iget-boolean v4, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->d:Z

    iget v5, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->e:I

    move-object v0, p2

    move-object v3, p0

    invoke-direct/range {v0 .. v5}, Lcom/baidu/mobad/feeds/BaiduNative;-><init>(Landroid/content/Context;Ljava/lang/String;Lcom/baidu/mobad/feeds/BaiduNative$BaiduNativeNetworkListener;ZI)V

    .line 4
    iget-boolean v0, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->f:Z

    invoke-virtual {p2, v0}, Lcom/baidu/mobad/feeds/BaiduNative;->setCacheVideoOnlyWifi(Z)V

    .line 5
    invoke-virtual {p2, p0}, Lcom/baidu/mobad/feeds/BaiduNative;->setDownloadListener(Lcom/baidu/mobad/feeds/BaiduNative$NativeDownloadListener;)V

    .line 6
    invoke-virtual {p2, p1}, Lcom/baidu/mobad/feeds/BaiduNative;->makeRequest(Lcom/baidu/mobad/feeds/RequestParameters;)V

    return-void
.end method

.method public onADExposed(Lcom/baidu/mobad/feeds/NativeResponse;)V
    .locals 1

    .line 1
    instance-of v0, p1, Lcom/baidu/mobad/feeds/XAdNativeResponse;

    if-eqz v0, :cond_0

    .line 2
    check-cast p1, Lcom/baidu/mobad/feeds/XAdNativeResponse;

    invoke-virtual {p1}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->onADExposed()V

    :cond_0
    return-void
.end method

.method public onADStatusChanged(Lcom/baidu/mobad/feeds/NativeResponse;)V
    .locals 1

    .line 1
    instance-of v0, p1, Lcom/baidu/mobad/feeds/XAdNativeResponse;

    if-eqz v0, :cond_0

    .line 2
    check-cast p1, Lcom/baidu/mobad/feeds/XAdNativeResponse;

    invoke-virtual {p1}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->onADStatusChanged()V

    :cond_0
    return-void
.end method

.method public onAdClick(Lcom/baidu/mobad/feeds/NativeResponse;)V
    .locals 1

    .line 1
    instance-of v0, p1, Lcom/baidu/mobad/feeds/XAdNativeResponse;

    if-eqz v0, :cond_0

    .line 2
    check-cast p1, Lcom/baidu/mobad/feeds/XAdNativeResponse;

    invoke-virtual {p1}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->onAdClick()V

    :cond_0
    return-void
.end method

.method public onLpClosed()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->h:Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0}, Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;->onLpClosed()V

    :cond_0
    return-void
.end method

.method public onNativeFail(Lcom/baidu/mobad/feeds/NativeErrorCode;)V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->h:Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0, p1}, Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;->onNativeFail(Lcom/baidu/mobad/feeds/NativeErrorCode;)V

    :cond_0
    return-void
.end method

.method public onNativeLoad(Ljava/util/List;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/baidu/mobad/feeds/NativeResponse;",
            ">;)V"
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->h:Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0, p1}, Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;->onNativeLoad(Ljava/util/List;)V

    :cond_0
    return-void
.end method

.method public onVideoDownloadFailed()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->h:Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0}, Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;->onVideoDownloadFailed()V

    :cond_0
    return-void
.end method

.method public onVideoDownloadSuccess()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->h:Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0}, Lcom/baidu/mobad/feeds/BaiduNativeManager$FeedAdListener;->onVideoDownloadSuccess()V

    :cond_0
    return-void
.end method

.method public setCacheVideoOnlyWifi(Z)V
    .locals 0

    .line 1
    iput-boolean p1, p0, Lcom/baidu/mobad/feeds/BaiduNativeManager;->f:Z

    return-void
.end method
